package com.androidservice.demo.service;

import org.springframework.stereotype.Service;

@Service
public class UserService {

    private static final String[] DUMMY_CREDENTIALS = new String[]{
            "wangketest:123456", "wangke:123456"
    };

    //模拟登录
    public boolean doLogin(String mEmail, String mPassword) {

        for (String credential : DUMMY_CREDENTIALS) {
                String[] pieces = credential.split(":");
                if (pieces[0].equals(mEmail)) {
                    // Account exists, return true if the password matches.
                    return pieces[1].equals(mPassword);
                }
            }


        return false;
    }
}
